# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pygeoip
_pkgname=pygeoip
pkgver=0.3.2
pkgrel=13
pkgdesc='Pure Python GeoIP API.'
arch=('any')
url='https://pypi.python.org/pypi/pygeoip'
license=('LGPL')
depends=('python')
makedepends=('python-setuptools')
optdepends=('geoip-database: provides a database for geoip lookups')
source=("https://pypi.python.org/packages/source/p/pygeoip/$_pkgname-$pkgver.tar.gz")
sha512sums=('7d7a6d04b7b00c068ae4b78176bbe5467a54e4c688034c3024013c1c42a2a23264d04ba2d0c9bf023e31601dff1b392d64c41c2f0d835758c1b65da91710122e')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

